import yaml

from apis.admin.goods import Goods
from apis.wx.cart import Cart


class BaseCase:
    __basic_test_data_path = "../datatest/"

    def setup_class(self):
        print("Running BaseCase::setup_class")
        test_data_path = BaseCase.__basic_test_data_path + "testEnv.yml"
        print(test_data_path)
        with open(test_data_path, encoding="utf-8") as f:
            test_data = yaml.safe_load(f)
        # print(test_data)
        self.goods = Goods(test_data["RoleBaseUrl"]["admin"], "admin")
        self.cart = Cart(test_data["RoleBaseUrl"]["wx"], "wx")

